Skip to content

Feat/sqlalchemy integration#3098

Open
SyedShahmeerAli12 wants to merge 5 commits intodeepset-ai:mainfrom
SyedShahmeerAli12:feat/sqlalchemy-integration
Open

Feat/sqlalchemy integration#3098
SyedShahmeerAli12 wants to merge 5 commits intodeepset-ai:mainfrom
SyedShahmeerAli12:feat/sqlalchemy-integration

Conversation

@SyedShahmeerAli12
Copy link
Copy Markdown
Contributor

Closes #3077

Adds a new sqlalchemy-haystack integration with a SQLAlchemyTableRetriever component
that connects to any SQLAlchemy-supported database (PostgreSQL, MySQL, SQLite, MSSQL,
etc.) and runs SQL queries, returning results as a Pandas DataFrame and Markdown table.

Test plan

  • All 12 unit tests pass with SQLite in-memory (no external DB required)
  • Covers init, serialization, run, error handling, row limit, and init_script

@SyedShahmeerAli12 SyedShahmeerAli12 requested a review from a team as a code owner April 3, 2026 08:07
@SyedShahmeerAli12 SyedShahmeerAli12 requested review from anakin87 and removed request for a team April 3, 2026 08:07
@github-actions github-actions bot added topic:CI integration:qdrant type:documentation Improvements or additions to documentation labels Apr 3, 2026
@anakin87 anakin87 requested a review from davidsbatista April 3, 2026 08:36
Closes deepset-ai#3077

- Adds SQLAlchemyTableRetriever component supporting any SQLAlchemy-compatible database
- Returns results as a Pandas DataFrame and Markdown-formatted table string
- Supports optional init_script executed on warm_up()
- Respects MAX_SYS_ROWS row limit (default 10,000)
- Uses StaticPool for SQLite in-memory to share state between connections
- Includes to_dict/from_dict serialization with Secret support
- Adds GitHub Actions workflow, labeler, coverage, and README table entry
@SyedShahmeerAli12 SyedShahmeerAli12 force-pushed the feat/sqlalchemy-integration branch from 38307ca to 25d674b Compare April 3, 2026 10:10
@SyedShahmeerAli12
Copy link
Copy Markdown
Contributor Author

Hello @davidsbatista This adds a minimal SQLAlchemyTableRetriever component that executes a SQL query via
SQLAlchemy and returns a pandas DataFrame + Markdown table. Ready for review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:qdrant topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Integration: SQLAlchemy Table Retriever

1 participant